#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;

//int main()
//{
//    std::string str("look for non-alphabetic characters...");
//
//    std::size_t found = str.find_first_not_of("abcdefghijklmnopqrstuvwxyz ");
//
//    if (found != std::string::npos)
//    {
//        std::cout << "The first non-alphabetic character is " << str[found];
//        std::cout << " at position " << found << '\n';
//    }
//    cout << str.at(found);
//    return 0;
//}
class Solution1 {
public:
	bool isPalindrome(string s) {
		string str;
		for (auto ch : s)
		{
			if (isalpha(ch))
			{
				str += tolower(ch);
			}
			if (isdigit(ch))
			{
				str += ch;
			}
		}
		string tmp = str;
		reverse(str.begin(), str.end());
		if (!str.compare(tmp))
			return true;
		else
			return false;

	}
};
class Solution2 {
public:
	string reverseStr(string s, int k) {
		string str;
		int m = s.length() / (2 * k);
		if (s.length() % (2 * k) != 0)
		{
			m++;
		}
		int tmp = m;
		string* p = new string[m];
		int pos = 0;
		int i = 0;
		while (m--)
		{
			p[i++] = s.substr(pos, 2 * k);
			pos += 2*k;
		}
		i = 0;
		m = tmp;
		while (--tmp)
		{
			string tmp1 = p[i].substr(0, k);
			string tmp2 = p[i].substr(k);
			reverse(tmp1.begin(), tmp1.end());
			str += tmp1+=tmp2;
			i++;
		}
		if (p[m - 1].size() < k)
		{
			reverse(p[m - 1].begin(), p[m - 1].end());
			str += p[m - 1];
		}
		if (p[m - 1].size() >= k)
		{

			string tmp1 = p[m-1].substr(0, k);
			string tmp2 = p[m-1].substr(k);
			reverse(tmp1.begin(), tmp1.end());
			str += tmp1 += tmp2;
		}
		return str;
	}
};
class Solution3 {
public:
	string reverseWords(string s) {
		int pos = 0, i = 0;
		string str=s;
		int k = 0;
		while((k=(int)(s.find_first_of(' ',pos)))>0)
		{
			string tmp = s.substr(pos, k-pos );
			reverse(tmp.begin(), tmp.end());
			str.replace(pos, k - pos, tmp);
			pos = k + 1;
		}
		string tmp = s.substr(pos);
		reverse(tmp.begin(), tmp.end());
		str.replace(pos, -1, tmp);
		return str;
	}
};
string operator+(string& num1, string& num2)
{
	int carry = 0;
	string num;
	int a = num1.length() - 1;
	int b = num2.length() - 1;

	while ((a + 1) && (b + 1))
	{
		num += ((carry + num1[a] + num2[b] - 2 * '0') % 10 + '0');
		carry = (carry + num1[a] + num2[b] - 2 * '0') / 10;
		a--;
		b--;
	}
	while (a + 1)
	{
		num += (num1[a] - '0' + carry) % 10 + '0';
		carry = (num1[a] - '0' + carry) / 10;
		a--;
	}
	while (b + 1)
	{
		num += (num2[b] - '0' + carry) % 10 + '0';
		carry = (num2[b] - '0' + carry) / 10;
		b--;
	}
	if (carry != 0)
	{
		num += '1';
	}
	reverse(num.begin(), num.end());
	return num;
}
string operator*(string& num1, string& num2)
{
	string ans;
	string up = num1;
	string low = num2;
	if (num1.size() < num2.size())
	{
		up = num2;
		low = num1;
	}
	
	for (int i=up.size()-1;i>=0;i--)
	{
		int carry = 0;
		int tmp1 = (up.at(i) - '0') * (low.at(0) - '0');
		carry = tmp1 / 10;
		string tmp2;
		if(carry!=0)
		tmp2 += carry + '0';
		tmp2 += tmp1 % 10 + '0';
		int m = i;
		for(int k=up.size() - i - 1;k>0;k--)
		{
			tmp2 += '0';
		}
		ans =ans+ tmp2;
	}
	return ans;
}
class Solution {
public:
	string multiply(string num1, string num2) {
		if (num1.size() == 1 && num1.at(0) == '0')
		{
			string ans="0";
			
			return ans;
		}
		if (num2.size() == 1 && num2.at(0) == '0')
		{
			string ans = "0";

			return ans;
			
		}
		string ans;
		string up = num1;
		string low = num2;
		if (num1.size() < num2.size())
		{
			up = num2;
			low = num1;
		}
		int k = low.size();
		int i = 0;
		while (i<k)
		{
			string tmp_ans;
			string tmp_low; 
			tmp_low += (low.at(low.size() - 1 - i));
			tmp_ans = up * tmp_low;
			for (int m = i;m > 0;m--)
			{
				tmp_ans += '0';
			}
			ans = ans + tmp_ans;
			i++;
		}
		return ans;
	}
};
int main()
{
	/*string str;
	getline(cin, str);
	int ret1 = str.find_last_of(' ');
	cout << str.length() - ret1-1;*/
	string str1,str2;
	getline(cin, str1);
	getline(cin, str2);
	cout << Solution().multiply(str1,str2);
	
	
	
	
	return 0;
}